package com.im.chat;

import com.im.chat.nett.NettyServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.scheduling.annotation.Async;

/**
 * @author chenmin
 * @since 2023-05-24
 **/
@SpringBootApplication
@Async
@Slf4j
public class ChatApplication  implements CommandLineRunner {
    public static void main(String[] args)  {
        ConfigurableApplicationContext context = SpringApplication.run( ChatApplication.class, args );
        context.getBean(NettyServer.class).start();
    }

    @Override
    public void run(String... args) {
        log.info("========================server start success========================");
    }

}
